/* 基本样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background-color: #f4f4f4;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* 页面头部 */
header {
    background-color: #4CAF50;
    color: #fff;
    padding: 20px;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 2rem;
    font-weight: bold;
}

.navbar ul {
    display: flex;
}

.navbar li {
    margin-right: 20px;
}

.navbar a {
    color: #fff;
    font-size: 1.2rem;
}

.login-link {
    color: #fff;
    font-size: 1.1rem;
    padding: 10px 20px;
    background-color: #333;
    border-radius: 5px;
}

#theme-toggle-container {
    position: relative;
}

#theme-toggle {
    padding: 10px;
    background-color: #333;
    color: #fff;
    border: none;
    cursor: pointer;
}

#theme-options {
    position: absolute;
    top: 40px;
    left: 0;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 5px;
    display: none;
    padding: 10px;
}

.theme-option {
    display: block;
    padding: 5px 10px;
    cursor: pointer;
}

.theme-option:hover {
    background-color: #f0f0f0;
}

/* 主体内容 */
main {
    padding: 20px;
}

.study-exchange {
    margin-bottom: 30px;
}

h2 {
    font-size: 2rem;
    margin-bottom: 20px;
}

.post {
    background-color: #fff;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.post img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

.post h3 {
    font-size: 1.5rem;
    margin: 15px 0;
}

.post .author {
    font-size: 0.9rem;
    color: #777;
}

.post .excerpt {
    margin: 15px 0;
    font-size: 1.1rem;
    color: #333;
}

.read-more {
    color: #4CAF50;
    font-weight: bold;
}

.new-post-link {
    text-align: center;
    margin-top: 20px;
}

.new-post-link a {
    font-size: 1.2rem;
    padding: 10px 20px;
    background-color: #4CAF50;
    color: #fff;
    border-radius: 5px;
}

.new-post-link a:hover {
    background-color: #45a049;
}

/* 页面底部 */
footer {
    background-color: #333;
    color: #fff;
    padding: 10px;
    text-align: center;
}

/* 主题样式 */

/* 默认浅色主题 */
body {
    background-color: #f4f4f4;
    color: #333;
}

header {
    background-color: #4CAF50;
}

footer {
    background-color: #333;
}

/* 深色主题 */
body.dark-theme {
    background-color: #333;
    color: #f4f4f4;
}

header.dark-theme {
    background-color: #333;
}

footer.dark-theme {
    background-color: #222;
}

/* 黄色主题 */
body.yellow-theme {
    background-color: #ffec99;
    color: #333;
}

header.yellow-theme {
    background-color: #ffcc00;
}

footer.yellow-theme {
    background-color: #ffaa00;
}

/* 浅绿色主题 */
body.light-green-theme {
    background-color: #eaf7e1;
    color: #333;
}

header.light-green-theme {
    background-color: #a8d08d;
}

footer.light-green-theme {
    background-color: #8b9a6a;
}
